Skip to content

BEP-439: Implement EIP-2537: Precompile for BLS12-381 curve operations#2719

Closed
buddh0 wants to merge 3 commits intobnb-chain:developfrom
buddh0:BEP_439_bls_precompiles
Closed

BEP-439: Implement EIP-2537: Precompile for BLS12-381 curve operations#2719
buddh0 wants to merge 3 commits intobnb-chain:developfrom
buddh0:BEP_439_bls_precompiles

Conversation

@buddh0
Copy link
Contributor

@buddh0 buddh0 commented Sep 23, 2024

Description

BEP-439: Implement EIP-2537: Precompile for BLS12-381 curve operations

Rationale

tell us why we need these changes...

Example

how to verify the code implement? two steps:

  1. ensure test case files in bsc/core/vm/testdata/precompiles are the same with go-ethereum/core/vm/testdata/precompiles at the latest commit
  2. run the test cases
cd core/vm
go test -run TestPrecompiledBLS12381

all pass

Changes

the first two commitss are picked from upstream
the third commit refers to ethereum/go-ethereum#29552

MariusVanDerWijden and others added 3 commits September 23, 2024 18:00
…#29441)

This PR updates the bls contracts from our internal implementation which is an unmaintained fork of the kilic library to the gnark-crypto library that is actively maintained by consensys.

It also updates the gas-costs according to the EIP
@buddh0
Copy link
Contributor Author

buddh0 commented Sep 23, 2024

lint error for commits from upstream, so ignore

@buddh0
Copy link
Contributor Author

buddh0 commented Sep 23, 2024

please reserve all commits when merging into develop!

@buddh0 buddh0 marked this pull request as ready for review September 23, 2024 10:27
@buddh0 buddh0 changed the title BEP-439: Implement EIP-2537: Precompile for BLS12-381 curve operations BEP-439: Precompile for BLS12-381 curve operations Sep 23, 2024
@buddh0 buddh0 changed the title BEP-439: Precompile for BLS12-381 curve operations BEP-439: Implement EIP-2537: Precompile for BLS12-381 curve operations Sep 26, 2024
@buddh0
Copy link
Contributor Author

buddh0 commented Sep 29, 2024

the implement is aligned with pectrac-devnet-3,
according to the latest Ethereum All Core Developers Execution Call #197
image
so the spec still not be finalized.

Copy link

@octavio12345300 octavio12345300 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

listo

@buddh0
Copy link
Contributor Author

buddh0 commented Oct 10, 2024

convert to draft, for the gas cost will change

@buddh0 buddh0 marked this pull request as draft October 10, 2024 08:01
@will-2012
Copy link
Contributor

convert to draft, for the gas cost will change

What is the reason for this? :)

@buddh0
Copy link
Contributor Author

buddh0 commented Nov 22, 2024

has been upstreamed in PR #2761

@buddh0 buddh0 closed this Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants